package com.zx.idc.backend.gui.scheduler.report.domain;

import com.zx.idc.ds.report.rdomain.service.impl.RDomainArchiveDayServiceImpl;
import org.quartz.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;


/**
 * 统计域名备案日报Job
 * 注意：由于数据源依赖关系的存在， 备案域名统计job 应该配置发生在活跃域名统计job之后
 *
 */
@PersistJobDataAfterExecution
@DisallowConcurrentExecution
public class RDomainArchiveDayJob implements Job {

    private static final Logger LOG = LoggerFactory.getLogger(RDomainArchiveDayJob.class);

    @Autowired
    private RDomainArchiveDayServiceImpl domainArchiveDayService;

    @Override
    public void execute(JobExecutionContext ctx) throws JobExecutionException {
        LOG.info("Aggregate domain archive daily report job start...");
        domainArchiveDayService.aggregate();
        LOG.info("Aggregate domain archive daily report job done.");
    }


}
